package com.hepinghospital.user;

/**
 * @Description: java类作用描述
 * @Author: lzp
 * @CreateDate: 2023/11/8 16:04
 * @UpdateRemark: 更新说明
 */
public class Test {

    public static void main(String[] args) {
        long k;
        double sum = 0.0;
        for (k = 1; sum <= 5.0; k++) {
            sum = sum + 1.0 / k;
            System.out.println("第" + k + "天共爬了" + sum + "米");
        }
    }
}
